+2006-12-21 Matthew Barnes <mbarnes@redhat.com>
+
+ * docs/reference/gdk/gdk-sections.txt:
+ * gdk/gdkcolor.[ch] (gdk_color_to_string): Add a function for
+ converting a GdkColor to a string (#373856).
+
+ * configure.in: Bump pango requirement to 1.15.2.
+
2006-12-20 Matthias Clasen <mclasen@redhat.com>
* gdk/keynames.txt: Mark arrow keys as translatable. (#369506,
# required versions of other packages
m4_define([glib_required_version], [2.12.0])
-m4_define([pango_required_version], [1.12.0])
+m4_define([pango_required_version], [1.15.2])
m4_define([atk_required_version], [1.9.0])
m4_define([cairo_required_version], [1.2.0])
gdk_color_change
gdk_color_equal
gdk_color_hash
+gdk_color_to_string
<SUBSECTION Standard>
GDK_COLORMAP
return FALSE;
}
+/**
+ * gdk_color_to_string:
+ * @color: a #GdkColor
+ *
+ * Returns a textual specification of @color in the hexadecimal form
+ * <literal>#rrrrggggbbbb</literal>, where <literal>r</literal>,
+ * <literal>g</literal> and <literal>b</literal> are hex digits
+ * representing the red, green and blue components respectively.
+ *
+ * Return value: a newly-allocated text string
+ *
+ * Since: 2.12
+ **/
+gchar *
+gdk_color_to_string (const GdkColor *color)
+{
+ PangoColor pango_color;
+
+ g_return_val_if_fail (color != NULL, NULL);
+
+ pango_color.red = color->red;
+ pango_color.green = color->green;
+ pango_color.blue = color->blue;
+
+ return pango_color_to_string (&pango_color);
+}
+
/**
* gdk_colormap_get_system:
*
GdkVisual *gdk_colormap_get_visual (GdkColormap *colormap);
-GdkColor *gdk_color_copy (const GdkColor *color);
-void gdk_color_free (GdkColor *color);
-gboolean gdk_color_parse (const gchar *spec,
- GdkColor *color);
-guint gdk_color_hash (const GdkColor *colora);
-gboolean gdk_color_equal (const GdkColor *colora,
- const GdkColor *colorb);
+GdkColor *gdk_color_copy (const GdkColor *color);
+void gdk_color_free (GdkColor *color);
+gboolean gdk_color_parse (const gchar *spec,
+ GdkColor *color);
+guint gdk_color_hash (const GdkColor *colora);
+gboolean gdk_color_equal (const GdkColor *colora,
+ const GdkColor *colorb);
+gchar * gdk_color_to_string (const GdkColor *color);
GType gdk_color_get_type (void) G_GNUC_CONST;